#include<stdio.h>
#include<stdlib.h>
#define MAX_NUM 2

int convert(char* input,char* output){
	int i=0,j,r=0,n,len = strlen(input);
	char ch = input[0];
	while(i<len){
		r = 0;
		j = i+1;
		while(j<len && ch == input[j]){
		    r++;
		    j++;
		}
		n = (input[i] - 'a')%26 + 1;
		if(r == 2){
			input[i+1] = 'a' + (n+1);
			input[i+2] = 'a' + n;
		}
		if(r == 1)
			input[i+1] = 'a' + (n+1);
		input[i] = 'a' + n;
		i = j;
		ch = input[i];
	}
	return 0;
}

int main(){
	char sam_in[MAX_NUM][10] = {{"abcd"},{"abbbcd"}};
	char output[100];
	int i=0;
	while(i < MAX_NUM){
		memset(output,0,sizeof(output));
		convert(sam_in[i],output);
		printf("%s\n",sam_in[i]);
		i++;
	}
	return 0;
}